# -*- coding: utf-8 -*-
# @Time    : 2023/2/9 15:14
# @Author  : kali

from flask import request

from api import ApiResource
from service.question_service import get_question_data
from spider import tags_detail_spider


class Question(ApiResource):
    def get(self):
        req_data = request.args.to_dict()
        data, count = get_question_data(req_data)
        return self.success(data=data, count=count)


class QuestionSpider(ApiResource):

    def get(self):
        tags_detail_spider()
        return self.success()
